"""

@author: lingw
@email: gw.lin@hzgosun.com
@file: pmManage.py
@time: 2019-5-28 下午 4:19

这一行开始写关于本文件的说明与解释

"""

from common.poium import Page
from common.vue.float_window import FloatWindow
from common.vue.table import VueTable, VueTurnPage
from common.vue.label import ElementType as ET
from common.vue.label import ElementBaseLabel
from common.vue.search import VueSearch
from common.vue.tree import VueTree, VueBoxTree
from common.vue.region import VueRegion
from common.vue.button import VueButton
from common.vue.element import VueElements

class SearchTools(VueSearch):
    """查询区域"""

    search_name = ElementBaseLabel(ET.INPUT, '姓名')
    search_state = ElementBaseLabel(ET.DROPDOWN_LIST, '状态')
    search_btn = VueButton('检索')

    def __init__(self):
        super(SearchTools, self).__init__()


class Table(VueTable):
    """项目经理列表"""

    add_btn = VueButton('添加')

    def __init__(self):
        super(Table, self).__init__()


class AddPmManage(FloatWindow):
    """添加项目经理窗口"""

    add_name = ElementBaseLabel(ET.INPUT, '姓名')
    add_phone = ElementBaseLabel(ET.INPUT, '联系方式')
    add_state = ElementBaseLabel(ET.DROPDOWN_LIST, '状态')

    def __init__(self, index=None, title=None):
        super(AddPmManage, self).__init__(index=index, title=title)


class ModifyPmManage(AddPmManage):
    """修改项目经理窗口"""

    def __init__(self, index=None, title=None):
        super(ModifyPmManage, self).__init__(index=index, title=title)


class PmManagePage(Page):
    searchTools = SearchTools()
    addPmManage = AddPmManage(title="添加项目经理")
    modifyPmManage = ModifyPmManage(title="项目经理详情")
    table = Table()
    turnPage = VueTurnPage()
